﻿@{
    var list = ViewData["List"] as List<MenuListModel> ?? new List<MenuListModel>(0);
    var deepObj = ViewData["Deep"]?.ToString();
    int deep;
    int.TryParse(deepObj, out deep);
    var style = "padding-left:" + deep + "em";
}

@foreach (var item in list)
{
    <option style="@style" value="@item.Value">@item.Text</option>
    @Html.Partial("_MenuChild", new ViewDataDictionary { { "List", item.Childs }, { "Deep", deep + 1 } })
}
